const baseURL = 'https://lottery.qnsyw.cn/api/'
export const myRequesy = (options) => {
	return new Promise((resolve, reject) => {
		uni.request({
			url: baseURL + options.url,
			method: options.method || 'GET',
			data: options.data || {},
			header: {
				Authorization: uni.getStorageSync('token') || '',
			},

			success: (res) => {
				resolve(res.data)
			},
			fail: (err) => {
				uni.showToast({
					title: '请求接口失败',
					icon: "error"
				})
				reject(err)
			}
		})
	})
}
